<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="java.io.*"%>
<%@ page import="java.util.*"%>
<%@ page import="org.jbpm.*"%>
<%@ page import="org.jbpm.graph.def.*"%>
<%@ page import="org.jbpm.graph.exe.*"%>
<%
		 JbpmContext jbpmContext=JbpmConfiguration.getInstance().createJbpmContext();
         try {
            ProcessDefinition pd=jbpmContext.getGraphSession().findLatestProcessDefinition("timer");
            ProcessInstance pi = pd.createProcessInstance();
            
            //获取流程实例对应的token
            Token rootToken = pi.getRootToken();
            
            //使流程向下运行,流程应该停留在task-node1节点上,将产生一个名为test task的任务实例,同时触发timer
            rootToken.signal();
            System.out.println("当前节点的名称为:"+rootToken.getNode().getName());
        } catch(Exception ex){
			ex.printStackTrace();
		} finally {
            jbpmContext.close();
        }

 %>